<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>sock: sock::net::TcpWorker Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">sock
   &#160;<span id="projectnumber">v0.11</span>
   </div>
   <div id="projectbrief">C++ Network Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacesock.html">sock</a></li><li class="navelem"><a class="el" href="namespacesock_1_1net.html">net</a></li><li class="navelem"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html">TcpWorker</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classsock_1_1net_1_1_tcp_worker-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sock::net::TcpWorker Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="tcp__worker_8h_source.html">tcp_worker.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sock::net::TcpWorker:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsock_1_1net_1_1_tcp_worker.png" usemap="#sock::net::TcpWorker_map" alt=""/>
  <map id="sock::net::TcpWorker_map" name="sock::net::TcpWorker_map">
<area href="classsock_1_1base_1_1_thread.html" title="线程类 " alt="sock::base::Thread" shape="rect" coords="0,56,129,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">状态信息  <a href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a35fba23c2a4971863c4150ed247fe96e"><td class="memItemLeft" align="right" valign="top">typedef boost::function&lt; void(<a class="el" href="classsock_1_1net_1_1_tcp_connection.html">TcpConnection</a> *)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a35fba23c2a4971863c4150ed247fe96e">PassTcpConnectionPointerFunc</a></td></tr>
<tr class="separator:a35fba23c2a4971863c4150ed247fe96e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classsock_1_1base_1_1_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classsock_1_1base_1_1_thread')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classsock_1_1base_1_1_thread.html">sock::base::Thread</a></td></tr>
<tr class="memitem:a594bf462100702a1b657eacded576f3b inherit pub_types_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#a594bf462100702a1b657eacded576f3b">State</a> { <a class="el" href="classsock_1_1base_1_1_thread.html#a594bf462100702a1b657eacded576f3ba0fd707d5d03ddc089a0bf38d8066f8a9">READY</a>, 
<a class="el" href="classsock_1_1base_1_1_thread.html#a594bf462100702a1b657eacded576f3ba9de7b235e51da1a413d3350cbe206214">RUNNING</a>, 
<a class="el" href="classsock_1_1base_1_1_thread.html#a594bf462100702a1b657eacded576f3ba111a8a5e3bc9f387b6566b7f284ee633">EXIT</a>
 }<tr class="memdesc:a594bf462100702a1b657eacded576f3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程状态  <a href="classsock_1_1base_1_1_thread.html#a594bf462100702a1b657eacded576f3b">More...</a><br /></td></tr>
<tr class="separator:a594bf462100702a1b657eacded576f3b inherit pub_types_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8593b752fabd3539ba8f14c36488bf8e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a8593b752fabd3539ba8f14c36488bf8e">TcpWorker</a> (void)</td></tr>
<tr class="separator:a8593b752fabd3539ba8f14c36488bf8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50fb91b5ec83bc8d0afa55f10d01ec72"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a50fb91b5ec83bc8d0afa55f10d01ec72">~TcpWorker</a> (void)</td></tr>
<tr class="separator:a50fb91b5ec83bc8d0afa55f10d01ec72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8ff72964ca27b1218484530322b2531"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#ac8ff72964ca27b1218484530322b2531">stop</a> (void)</td></tr>
<tr class="memdesc:ac8ff72964ca27b1218484530322b2531"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止线程  <a href="#ac8ff72964ca27b1218484530322b2531">More...</a><br /></td></tr>
<tr class="separator:ac8ff72964ca27b1218484530322b2531"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac109fdb1e156de25c7d120d7af0c2ab8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#ac109fdb1e156de25c7d120d7af0c2ab8">run</a> (void)</td></tr>
<tr class="memdesc:ac109fdb1e156de25c7d120d7af0c2ab8"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程执行函数  <a href="#ac109fdb1e156de25c7d120d7af0c2ab8">More...</a><br /></td></tr>
<tr class="separator:ac109fdb1e156de25c7d120d7af0c2ab8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a297a303782cda8befae4bf96c4f9bddf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a297a303782cda8befae4bf96c4f9bddf">bindConnection</a> (<a class="el" href="namespacesock_1_1net.html#ac7ab8c7fe4e8e023f2fea799b74122ed">TcpConnectionPtr</a> &amp;conn)</td></tr>
<tr class="memdesc:a297a303782cda8befae4bf96c4f9bddf"><td class="mdescLeft">&#160;</td><td class="mdescRight">绑定连接到工作线程  <a href="#a297a303782cda8befae4bf96c4f9bddf">More...</a><br /></td></tr>
<tr class="separator:a297a303782cda8befae4bf96c4f9bddf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1c75330f7b70da0f4ad7e1d282eed05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#af1c75330f7b70da0f4ad7e1d282eed05">closeConnection</a> (<a class="el" href="classsock_1_1net_1_1_tcp_connection.html">TcpConnection</a> *conn)</td></tr>
<tr class="memdesc:af1c75330f7b70da0f4ad7e1d282eed05"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭连接  <a href="#af1c75330f7b70da0f4ad7e1d282eed05">More...</a><br /></td></tr>
<tr class="separator:af1c75330f7b70da0f4ad7e1d282eed05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fcdb4fe410e074266a7de6021ad7b78"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a0fcdb4fe410e074266a7de6021ad7b78">getLoad</a> (void)</td></tr>
<tr class="memdesc:a0fcdb4fe410e074266a7de6021ad7b78"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取工作线程管理的连接数  <a href="#a0fcdb4fe410e074266a7de6021ad7b78">More...</a><br /></td></tr>
<tr class="separator:a0fcdb4fe410e074266a7de6021ad7b78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a029d169a58cfc41b29efaee972f41980"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a029d169a58cfc41b29efaee972f41980">getStatics</a> (void)</td></tr>
<tr class="memdesc:a029d169a58cfc41b29efaee972f41980"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取服务器状态  <a href="#a029d169a58cfc41b29efaee972f41980">More...</a><br /></td></tr>
<tr class="separator:a029d169a58cfc41b29efaee972f41980"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classsock_1_1base_1_1_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classsock_1_1base_1_1_thread')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classsock_1_1base_1_1_thread.html">sock::base::Thread</a></td></tr>
<tr class="memitem:a3ad909f591333628c22cb5ba10957923 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#a3ad909f591333628c22cb5ba10957923">Thread</a> (void)</td></tr>
<tr class="separator:a3ad909f591333628c22cb5ba10957923 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1e25588ebe47a2a6d79ef8c686a992b inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#af1e25588ebe47a2a6d79ef8c686a992b">~Thread</a> (void)</td></tr>
<tr class="separator:af1e25588ebe47a2a6d79ef8c686a992b inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1ff0068d8e7ab1c8522827b89937611 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#aa1ff0068d8e7ab1c8522827b89937611">start</a> (void)</td></tr>
<tr class="memdesc:aa1ff0068d8e7ab1c8522827b89937611 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动线程，失败抛出异常  <a href="#aa1ff0068d8e7ab1c8522827b89937611">More...</a><br /></td></tr>
<tr class="separator:aa1ff0068d8e7ab1c8522827b89937611 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab982afa8abe62f1883fbd199c6f6ac2c inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#ab982afa8abe62f1883fbd199c6f6ac2c">join</a> (void)</td></tr>
<tr class="memdesc:ab982afa8abe62f1883fbd199c6f6ac2c inherit pub_methods_classsock_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接线程，等待退出  <a href="#ab982afa8abe62f1883fbd199c6f6ac2c">More...</a><br /></td></tr>
<tr class="separator:ab982afa8abe62f1883fbd199c6f6ac2c inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9a901de1d721ab3cbaf38978bd1a763 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsock_1_1base_1_1_thread.html#a594bf462100702a1b657eacded576f3b">State</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#ab9a901de1d721ab3cbaf38978bd1a763">getState</a> (void) const </td></tr>
<tr class="memdesc:ab9a901de1d721ab3cbaf38978bd1a763 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取线程状态  <a href="#ab9a901de1d721ab3cbaf38978bd1a763">More...</a><br /></td></tr>
<tr class="separator:ab9a901de1d721ab3cbaf38978bd1a763 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5905e1e9f050b4dce88a4da576a7d655 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#a5905e1e9f050b4dce88a4da576a7d655">getId</a> (void) const </td></tr>
<tr class="memdesc:a5905e1e9f050b4dce88a4da576a7d655 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取线程ID  <a href="#a5905e1e9f050b4dce88a4da576a7d655">More...</a><br /></td></tr>
<tr class="separator:a5905e1e9f050b4dce88a4da576a7d655 inherit pub_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a3ecf3132e8c4bf890c07853cfab7619c"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a3ecf3132e8c4bf890c07853cfab7619c">TcpServer</a></td></tr>
<tr class="separator:a3ecf3132e8c4bf890c07853cfab7619c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classsock_1_1base_1_1_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classsock_1_1base_1_1_thread')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classsock_1_1base_1_1_thread.html">sock::base::Thread</a></td></tr>
<tr class="memitem:a8c9a6787ece1b03536a2762920075500 inherit pub_static_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">static id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#a8c9a6787ece1b03536a2762920075500">currentTid</a> (void)</td></tr>
<tr class="memdesc:a8c9a6787ece1b03536a2762920075500 inherit pub_static_methods_classsock_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前线程ID  <a href="#a8c9a6787ece1b03536a2762920075500">More...</a><br /></td></tr>
<tr class="separator:a8c9a6787ece1b03536a2762920075500 inherit pub_static_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10a9bbb6c05e52f32fcfe7138198c80a inherit pub_static_methods_classsock_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsock_1_1base_1_1_thread.html#a10a9bbb6c05e52f32fcfe7138198c80a">sleep</a> (int ms)</td></tr>
<tr class="memdesc:a10a9bbb6c05e52f32fcfe7138198c80a inherit pub_static_methods_classsock_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程休眠  <a href="#a10a9bbb6c05e52f32fcfe7138198c80a">More...</a><br /></td></tr>
<tr class="separator:a10a9bbb6c05e52f32fcfe7138198c80a inherit pub_static_methods_classsock_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>服务器工作线程 </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a35fba23c2a4971863c4150ed247fe96e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef boost::function&lt;void(<a class="el" href="classsock_1_1net_1_1_tcp_connection.html">TcpConnection</a>*)&gt; <a class="el" href="classsock_1_1net_1_1_tcp_worker.html#a35fba23c2a4971863c4150ed247fe96e">sock::net::TcpWorker::PassTcpConnectionPointerFunc</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8593b752fabd3539ba8f14c36488bf8e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TcpWorker::TcpWorker </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a50fb91b5ec83bc8d0afa55f10d01ec72"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TcpWorker::~TcpWorker </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a297a303782cda8befae4bf96c4f9bddf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TcpWorker::bindConnection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacesock_1_1net.html#ac7ab8c7fe4e8e023f2fea799b74122ed">TcpConnectionPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>绑定连接到工作线程 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af1c75330f7b70da0f4ad7e1d282eed05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TcpWorker::closeConnection </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsock_1_1net_1_1_tcp_connection.html">TcpConnection</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭连接 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0fcdb4fe410e074266a7de6021ad7b78"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int sock::net::TcpWorker::getLoad </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取工作线程管理的连接数 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a class="anchor" id="a029d169a58cfc41b29efaee972f41980"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a> sock::net::TcpWorker::getStatics </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取服务器状态 </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="structsock_1_1net_1_1_tcp_worker_1_1_statics.html" title="状态信息 ">Statics</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac109fdb1e156de25c7d120d7af0c2ab8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TcpWorker::run </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>线程执行函数 </p>

<p>Implements <a class="el" href="classsock_1_1base_1_1_thread.html#a4b53c0e0df28893e36e92ea0f3723a2f">sock::base::Thread</a>.</p>

</div>
</div>
<a class="anchor" id="ac8ff72964ca27b1218484530322b2531"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TcpWorker::stop </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>停止线程 </p>

<p>Reimplemented from <a class="el" href="classsock_1_1base_1_1_thread.html#a27853293167cb8128d986dd856a77d8e">sock::base::Thread</a>.</p>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="a3ecf3132e8c4bf890c07853cfab7619c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classsock_1_1net_1_1_tcp_server.html">TcpServer</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>E:/git/sock/sock/net/<a class="el" href="tcp__worker_8h_source.html">tcp_worker.h</a></li>
<li>E:/git/sock/src/net/<a class="el" href="tcp__worker_8cc.html">tcp_worker.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
